package ace.cmp.spring.data.jdbc.querydsl.test.core.biz.dao.repository;

import ace.cmp.spring.data.jdbc.querydsl.test.core.biz.dao.entity.CasUser;
import ace.cmp.spring.data.jdbc.querydsl.test.core.biz.dao.entity.CasUserOnlyNameWithNotExistNameView;
import java.util.List;
import org.springframework.data.jdbc.repository.query.Query;

/**
 * @author caspar
 * @date 2023/2/13 9:51 扩展查询
 */
public interface CasUserRepositoryQueryEx
    extends org.springframework.data.repository.Repository<CasUser, String> {
  List<CasUser> findByNameContainsAndAndId(String name, String id);

  @Query("SELECT id,name,'asdfsadf' as exist_not_name FROM cas_user LIMIT 1")
  CasUserOnlyNameWithNotExistNameView findCASUserOnlyNameWithNotExistNameView();
}
